<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(
	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	'name'=>'SHOPPING.BAOKIM.VN',

	'language'=>'vi',

	// preloading 'log' component
	'preload'=>array(
//		'log',
	),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
		'ext.common.registry.models.Registry',
		'ext.common.SMSCentralComponent',
		'ext.common.RestApiLog.models.RestApiLog',
		'ext.common.RESTful.RestModel',
		'ext.helpers.phpexcel.EExcelView',
		'ext.helpers.download.EDownloadHelper',
	),

	// application components
	'components'=>array(
		'registry'=>array(
			'class'=>'ext.common.registry.registryComponent',
		),

		'bootstrap'=>array(
			'class'=>'ext.bootstrap_v2.components.Bootstrap', // assuming you extracted bootstrap under extensions
		),

		'user'=>array(
			'allowAutoLogin'=>true,
			'loginUrl'=>array('/accounts/login'),
		),

		'hqUser'=>array(
			'class'=>'ext.Hq.HqUserComponent',
			'allowAutoLogin'=>true,
			'loginUrl'=>array('/hqUser/signIn'),
		),

		// uncomment the following to use a MySQL database
		/*
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=testdrive',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => '',
			'charset' => 'utf8',
		),
		*/
		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'site/error',
		),
		// uncomment the following to enable URLs in path-format
		'urlManager'=>array(
			'urlFormat'=>'path',
			'showScriptName'=>false,
			'rules'=>array(
				/*'ngan-hang/giao-dich/<_a:\w+>'=>'bank/bankTransaction/<_a>',

				'ngan-hang<_c:(/\w+)?>'=>'bank<_c>',
				'ngan-hang/<_c:\w+>'=>'bank/<_c>',
				'ngan-hang/<_c:\w+>/<_a:\w+>'=>'bank/<_c>/<_a>',
			*/
				'<_c:\w+>/'=>'<_c>/',
				'<_c:\w+>/<_a:\w+>'=>'<_c>/<_a>',
				'<_m:\w+>/<_c:\w+>/<_a:\w+>'=>'<_m>/<_c>/<_a>',
			),
		),

		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=shopping',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => '',
			'charset' => 'utf8',
			'schemaCachingDuration'=>3600,
		),

		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),
	),

	// application-level parameters that can be accessed
	// using Yii::app()->params['paramName']
	'params'=>array(
		// this is used in contact page
		'adminEmail'=>'webmaster@example.com',
	),
);